package com.southwind.feign;

import com.southwind.entity.ProductInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient("product")
public interface ProductFeignClient {

    @GetMapping("/buyer/product/findById/{id}")
    ProductInfo findById(@PathVariable Integer id);

    @PutMapping("/buyer/product/subStock/{id}/{quantity}")
    Boolean subStock(@PathVariable Integer id, @PathVariable Integer quantity);
}
